package com.soup.lab.repository;

import com.soup.lab.repository.dao.FruitMapper;
import com.soup.lab.repository.model.Fruit;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.concurrent.TimeUnit;

@SpringBootApplication
@MapperScan(basePackages = "com.soup.lab.repository.dao")
public class MainApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(MainApplication.class, args);
        FruitService bean = context.getBean(FruitService.class);
//        bean.testGetMultiTimes(1);
//        bean.testGetMultiThread(1);
        bean.testGetThreadPool(1);
    }


}
